home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 8
/
Night Owl CD-ROM (NOPV8) (Night Owl Publisher) (1993).ISO
/
047a
/
probots.arj
/
P-ROBOTS.DOC
< prev
next >
Wrap
Text File
|
1988-11-20
|
64KB
|
1,711 lines
P-ROBOTS
A Game for IBM and Macintosh PASCAL Programmers
By
David Malmberg
Distributed by
Softworks
43064 Via Moraga
Mission San Jose, California 94539
(415) 659-0533
_______
____|__ | MEMBER
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___|
Copyrighted 1988 -- All Rights Reserved
By David Malmberg
TABLE OF CONTENTS
P-ROBOTS REGISTRATION/ORDER FORM . . . . . . . . . . . . . . . . . . . . ii
LICENSE TERMS (Shareware Rules) . . . . . . . . . . . . . . . . . . . . . iii
DISTRIBUTION OF P-ROBOTS BY DISK VENDORS . . . . . . . . . . . . . . . . iv
P-ROBOTS PRODUCT/TECHNICAL SUPPORT . . . . . . . . . . . . . . . . . . . v
ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
HARDWARE AND SOFTWARE REQUIREMENTS . . . . . . . . . . . . . . . . . . . 1
FILES ON THE DISK . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
GETTING STARTED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
INVOKING A CONTEST . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
CONTROLLING YOUR ROBOT'S MOVEMENT . . . . . . . . . . . . . . . . . . . . 4
ATTACKING OTHER ROBOTS . . . . . . . . . . . . . . . . . . . . . . . . . 5
OTHER SPECIAL P-ROBOTS FUNCTIONS AND PROCEDURES . . . . . . . . . . . . . 7
TIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
DISTANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
ANGLE_TO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
RANDOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
TRIG FUNCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
INFLICTING DAMAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
PUTTING IT ALL TOGETHER . . . . . . . . . . . . . . . . . . . . . . . . . 9
ROBOT PROGRAMMING RULES . . . . . . . . . . . . . . . . . . . . . . . . . 11
APPENDIX I: COMPILER ERRORS . . . . . . . . . . . . . . . . . . . . . . . 13
APPENDIX II: RUN-TIME ERRORS . . . . . . . . . . . . . . . . . . . . . . 15
APPENDIX III: COMMON PROBLEMS . . . . . . . . . . . . . . . . . . . . . . 16
APPENDIX IV: THE P-ROBOTS PASCAL LANGUAGE . . . . . . . . . . . . . . . . 17
APPENDIX V: A BLATANT "PLUG" FOR ANOTHER SOFTWORKS PRODUCT . . . . . . . 18
APPENDIX VI: ABOUT THE AUTHOR . . . . . . . . . . . . . . . . . . . . . . 22
i
P-ROBOTS REGISTRATION/ORDER FORM
Remit to: Softworks
43064 Via Moraga
Mission San Jose, California 94539
You can also order by phone using your Mastercard or VISA by dialing (415)
659-0533, 12:00 noon to 9:00 p.m., PST ONLY, Monday to Friday.
P-ROBOTS Registration .................................. @ $ 20.00 ea $______
Registration entitles you to the following:
(1) Notice of all future P-ROBOTS upgrades.
(2) Latest version of the program, with a collection of the
most recent and best robots.
(3) Turbo Pascal source code for P-ROBOTS.
(4) Turbo Pascal source code for the multi-tasking PASCAL
compiler used as the basis for developing P-ROBOTS.
(5) Telephone support from 7:00 to 9:00 PST (M-F).
(6) A warm glow from having supported at least one of the many
Shareware products you probably use.
(7) The P-ROBOTS author's eternal gratitude.
Orders are normally shipped by US mail at no additional charge.
For UPS shipment, please add $4.00...................@ $ 4.00 ea $ ______
For shipments outside the United States, please add @ $ 5.00 ea $ ______
Subtotal $ ______
(California residents please add 7% sales tax) Tax $ ______
TOTAL $ ______
Payment by: ( ) Check ( ) MasterCard ( ) VISA ( ) Cash
Name: _______________________________________________________________
Address: _______________________________________________________________
: _______________________________________________________________
State: ______________________________ Zip:____________________________
Day Phone: ____________________________ Eve: _____________________________
Card #: _________________________________ Exp. Date: __________________
Signature of cardholder: _________________________________________________
Disk Version Desired: _____ Macintosh _____ IBM 5 1/4 _____ IBM 3 1/2
ii
LICENSE TERMS (Shareware Rules)
P-ROBOTS is NOT public domain or free software, but is being distributed as
"Shareware". This means that if you are a regular user of P-ROBOTS, you
should pay for your copy and become a registered user. Only from the income
from your registration fees can the author continue to provide product
support, make enhancements to P-ROBOTS, and stay in business.
Non-registered users of this software are granted a limited license to make an
evaluation copy for trial use on a private non-commercial basis, for the
express purpose of determining whether P-ROBOTS is suitable for their needs.
At the end of this trial period, the user should either register his/her copy
of P-ROBOTS or discontinue using it.
Registered users of P-ROBOTS may use P-ROBOTS on any computer, provided that
P-ROBOTS is used on only one computer at a time, and that the copy is not
routinely used on that computer by other people. If other people use the copy
of P-ROBOTS routinely, they should become registered users themselves.
Registered P-ROBOTS users may make archival and working copies of the P-ROBOTS
program disk to back up their software and protect their investment. They may
also make evaluation copies of P-ROBOTS for trial use by non-registered users,
subject to the terms outlined above.
Operators of electronic bulletin boards (Sysops) are encouraged to post
P-ROBOTS and related ROBOT game files for downloading by their users.
This license to use P-ROBOTS does NOT include the right to distribute or sell
P-ROBOTS. Distribution terms are detailed below.
P-ROBOTS may be uploaded to and downloaded from commercial systems such as
CompuServe, the Source, and BIX, so long as the only charge paid by the
subscriber is for on-line time and there is no charge for the program. Those
copying, sharing, and/or electronically transmitting the program are required
not to delete or modify the copyright notice and restrictive notices from the
program or documentation; anyone doing so will be treated as a contributory
copyright violator.
The P-ROBOTS documentation may not be modified by users. The program may not
be separated from the documentation when distributed. Printed or "Xeroxed"
copies of the P-ROBOTS documentation (i.e., this manual) may not be
distributed or sold without the written permission of Softworks.
iii
DISTRIBUTION OF P-ROBOTS BY DISK VENDORS
Distributors of "public domain" or user-supported software libraries must
obtain written permission to distribute copies of P-ROBOTS and related robot
game files. No one may use P-ROBOTS as a promotion for any commercial venture
or as an enticement for the user to pay for any program, product, or service
unless they have received the express written permission of the program's
author.
In order to distribute P-ROBOTS, a dealer or disk vendor must comply with the
following conditions:
(1) You must obtain written permission from Softworks to distribute
P-ROBOTS. If you receive no reply, write again: our silence does
NOT constitute permission, and you may not distribute "pending"
receipt of permission.
(2) A fee of not more than $7 may be charged for each disk sold.
P-ROBOTS may not be included on any disk sold for more than $7,
including CD-ROM or optical disks, without express written
permission from Softworks.
(3) Vendors may not modify or delete ANY files on the disk. Vendors may
add a "GO" program, and/or a reasonable number of small text files
designed to assist or provide a service to the user, but these added
files must be easily identifiable and end-users must be allowed to
delete the added files.
(4) Vendors must make a reasonable effort to distribute only the most
recent versions of P-ROBOTS. All vendors who have requested and
received written permission to distribute P-ROBOTS will be notified
of updates as they are released.
(5) All disk vendors must comply with any and all vendor guidelines or
vendor requirements set forth by the Association of Shareware
Professionals (ASP); for more information about ASP, contact its
chairman, Jim Button, at Buttonware in Seattle. Violation of any
ASP guideline or requirement automatically revokes permission to
distribute P-ROBOTS.
Until formal requirements are adopted by the ASP, you must comply with the
following guidelines: Vendors must make an attempt to educate users on the
nature of Shareware. Catalogs, advertisements, order forms, and all disks
sold should contain ASP-approved or recommended wording describing the nature
of shareware, and should explicitly state that no part of disk sale revenues
are paid to the programs' authors. When vendor catalogs or advertisements
carry both Shareware and PD programs, the Shareware programs must be
differentiated from the public domain programs in some way (in the
description, with an asterisk, by listing the registration fee, etc.).
iv
P-ROBOTS PRODUCT/TECHNICAL SUPPORT
Softworks will make every reasonable effort to fix P-ROBOTS bugs, and help
registered users by answering technical and other P-ROBOTS related questions.
This Product/Technical support for P-ROBOTS is available to registered users
(only) in several forms:
(1) By leaving a message in the 'Softworks' forum on BIX (the BYTE
Information Exchange).
(2) By telephone to David Malmberg at Softworks, Monday through Friday
from 7:00 PM to 9:00 PM (Pacific Coast Time) at (415) 659-0533.
Please respect these hours!
(3) By CompuServe E-Mail to David Malmberg, CompuServe ID 73435,1277.
(4) By letter to:
Softworks
43064 Via Moraga
Mission San Jose, California
94539
If you send disks or listings that you wish returned, be sure to
enclosed a self-addressed, stamped envelope (SASE) with sufficient
postage. If you do not enclose a SASE, your material will not be
returned.
Regardless of the method you use to solicit P-ROBOTS support, if you are
having a problem and you can not get P-ROBOTS to do what you think it should
do, please provide background information on the following:
(1) The version of P-ROBOTS you are using.
(2) The computer system you are using.
(3) Your system's configuration, i.e., amount of RAM, number and type of
disk drives, the type of monitor you are using.
(4) Any memory resident programs you have installed at the same time you
are using P-ROBOTS and a "rough idea" of what they do and how much
memory they take.
(5) Your problem, i.e., what is happening vs. what you think should be
happening.
v
ACKNOWLEDGEMENTS
P-ROBOTS owes a great deal to many people and to several previous programs.
The P-Code PASCAL compiler that was used in P-ROBOTS has a long history. It
was originally developed and published in 1976 by Nicklaus Wirth, the "father"
of PASCAL. In 1982, M. Ben-Ari developed and published a book describing how
to make the compiler capable of multi-tasking. Over the years, this compiler
has been converted to many, many different computers and to many different
dialects of PASCAL. In 1986, Charles Schoening converted the compiler to
Turbo Pascal version 2.0 on the IBM and released his version to the public
domain. I have enhanced and converted the compiler to the most recent
releases of Turbo Pascal (version 4.0 and 5.0 for the IBM and compatibles and
version 1.1 for the Macintosh). This version was then adapted to be the
compiler "engine" for P-ROBOTS.
The inspiration for P-ROBOTS and the basic overall design of the program came
from a similar program called C-ROBOTS by Tom Poindexter, which was first
published in 1985. As might be expected from the name, C-ROBOTS allows the
programmer to design and program his/her robots in the C language, rather than
PASCAL. If you are interested in C-ROBOTS, Tom is selling it as Shareware for
a $20 registration fee. The registration fee entitles you to the latest
version of the program, a large collection of excellent robots, and the source
code for the C-ROBOTS (written in C -- of course). C-ROBOTS can be ordered
from Tom at the following address:
Tom Poindexter
6864 Amherst Court
Highlands Ranch, CO
80126
C-ROBOTS can NOT be ordered from Softworks; it must be ordered from Tom
directly at the above address.
vi
INTRODUCTION
P-ROBOTS ("pee-robots") is a game based on computer programming in PASCAL.
The objective of the game is to design and program a "robot" that can triumph
over similar robots designed and programmed by others in a real-time battle of
wits and flying missiles. You control your robot by writing a procedure in
PASCAL to specify your robot's behavior and strategy in its efforts to
vanquish up to three other robots in a battle to the death. A variety of
pre-defined P-ROBOTS PASCAL functions allow your robot to track its position
on the battlefield, monitor its health or damage condition, and calculate the
distance and angle to opponents from its current battlefield position. Each
robot is equipped with a cannon to fire missiles, and a motorized drive
mechanism to either close in for the kill of a hapless opponent or flee from a
fierce foe.
P-ROBOTS is an excellent way for the novice programmer to sharpen his/her
PASCAL skills and have fun at the same time. However, P-ROBOTS does assumes
that the robot designer/programmer already knows the fundamentals of
programming in PASCAL.
For the experienced programmer, P-ROBOTS offers a chance to see just how well
you program in a programming environment where "bad" code can lead to graphic
and ignoble defeat and "brilliant" code can bring triumph and glory.
HARDWARE AND SOFTWARE REQUIREMENTS
If you intend to run P-ROBOTS on an IBM or compatible computer, you will need
at least 256K of memory and DOS 2.1 or later. Either a color or monochrome
monitor may be used. If you are using a color monitor, P-ROBOTS will
automatically detect it and use different colors for each robot. If you are
using a monochrome monitor, P-ROBOTS will display your robots accordingly.
If you intend to run P-ROBOTS on a Macintosh, you will need at least 512K of
memory. The Macintosh version of P-ROBOTS only runs in monochrome mode.
FILES ON THE DISK
You should have the following files on your P-ROBOTS disk:
P-ROBOTS.EXE The is the main program that is executed whenever you hold
a P-ROBOTS contest.
P-ROBOTS.DOC This file contains the documentation for P-ROBOTS. It is
a text file and can be printed by giving the command at
the DOS prompt: TYPE P-ROBOTS.DOC > PRN
PR-DEMO.BAT This is a tiny batch file that gives a demonstration of a
typical P-ROBOTS contest between three robots.
HOTSHOT.PR This is a file containing the PASCAL source code for a
robot named HOTSHOT. This is the robot that is given as
an example later in this manual.
1
????????.PR These are other PASCAL source code files for other robots.
All P-ROBOTS robots MUST have .PR file extensions.
Without this .PR extension, P-ROBOTS will not compile the
robot and enter it in any robot contests.
GETTING STARTED
To see a typical P-ROBOTS contest, just execute the batch file PR-DEMO. What
you will see will be the PASCAL source code for three robots being read from
the disk and compiled by P-ROBOTS. After being compiled successfully (without
any errors), you will then see a battle between these three robots. The
battle will last between one and four minutes and you will be able to see the
individual robots move around the battlefield, fire their missiles and get hit
when the missiles explode too near them on the screen. The screen and the
battlefield will look something like the following:
(x=0,y=999) (x=999,y=999)
+------------------------------------+ 1 CHASER
| | D% 015 Sc 218
| 1 | Sp 000 Hd 090
| \^/ | X= 902 Y= 890
^ | (missile exploding) <-#-> | ------------------
| | /v\ | 2 M66
| | D% 050 Sc 275
Y | + (missiles | Sp 100 Hd 180
| + flying) | X= 89 Y= 534
a | | ------------------
x | 2 | 3 NINJA
i | | D% 000 Sc 045
s | | Sp 000 Hd 000
| 3 | X= 423 Y= 350
| / | ------------------
| (robots) |
| |
| |
| |
| |
| | CPU
+------------------------------------+ Cycles: 34512
(x=0,y=0) X axis --> (x=999,y=0)
The battlefield is 1000 meters by 1000 meters with the coordinates 0,0 in the
lower left hand corner of the screen. The border of the battlefield has a
"fence" or "wall" around it which will cause the robots damage if they run
into it. Hitting a border of the battlefield will also cause your robot to
come crashing to a halt. On the battlefield, each robot is represented by a
number from 1 to 4. (There can be at most four robots in any one contest.)
Flying missiles will be represented on the screen by + symbols, and explosions
by a flurry of lines and corners -- as can be seen above.
2
Beside the battlefield are several "status" areas where information about each
robot is displayed. The number that precedes the robot's name is its symbol
on the screen. For example, the number 2 represents the robot M66 in the
above display. The "D%" field shows the percentage of damage that the robot
has incurred so far. When the damage percentage gets to 100% the robot dies.
The "Sc" field shows the direction in degrees (from 0 to 359) that the robot's
scanner is currently pointed. The scanner is used to detect the presence of
enemy robots and to aim missiles at them. The "Sp" field show the robot's
current speed. A speed of zero means the robot is standing still and the
maximum speed is 100. The "Hd" field show the robot's current heading, i.e.,
the direction it is moving. Like the scanner field, the heading is shown in
degrees from 0 to 359. The "X=" and "Y=" fields show the robot's current X
and Y coordinates on the battlefield, respectively. The
X-axis runs from 0 on the left to 999 on the right side of the battlefield.
The Y-axis runs from 0 at the bottom on the screen to 999 at the top.
All angles/directions in P-ROBOTS are calculated in degrees from 0 to 359
using the traditional compass directions you undoubted learned in Geometry.
Due east is zero degrees, north is 90 degrees, etc.:
135 90 45
\ | /
\ | /
180 --- x --- 0
/ | \
/ | \
225 270 315
INVOKING A CONTEST
Sooner or later, you are going to get tired just watching the DEMO match and
will want to see contests between other robots - perhaps, even your own robot
creations. There are two types of contests: single games or matches. In
single game mode, the game is played with "graphics" where the progress of the
battle can be watched on the screen. Match play is when you want to run a
series of contests (maybe as many as 100) between the same group of robots to
see what the winning percentages are for each contestant. Match play does not
display the actual battles, but just shows the summary of wins and loses as
each individual game is played. Match play is ideal for playing overnight.
If you want to stop a P-ROBOTS game (either single game or match), just hit
Control-Break.
To run a single game, just give a command at the DOS prompt like:
P-ROBOTS Robot1 Robot2 .. Robot3
For example, to run a single game between the robots: NINJA, HOTSHOT, WIMP and
BLASTER you would enter the command:
P-ROBOTS NINJA HOTSHOT WIMP BLASTER
Or to run a single game between HOTSHOT and WIMP you would enter the command:
P-ROBOTS HOTSHOT WIMP
3
It is also possible to test your robot against a "default" robot, named
TARGET, that is built into the P-ROBOTS program. TARGET just sits in the
center of the battlefield waiting to get shot at. However, TARGET does shoot
back -- so be warned that beating TARGET is not totally a trivial exercise.
TARGET is an excellent opponent for testing new robots. For example, to test
a robot named FRED against TARGET, just give the command:
P-ROBOTS FRED
To invoke a series of contest, i.e., match play, append a /MNNN behind the
normal single play command, where NNN represents the number of games you wish
to play in the match. For example, /M50 would cause 50 games to be played in
the match and /M100 would cause 100 games to be played.
Specifically, to run a match of 20 games between the robots: NINJA, HOTSHOT,
WIMP and BLASTER you would enter the command:
P-ROBOTS NINJA HOTSHOT WIMP BLASTER /M20
Or to run a series of 10 games between HOTSHOT and WIMP you would enter the
command:
P-ROBOTS HOTSHOT WIMP /M10
IMPORTANT NOTE: The actual files on the disk containing the source code for
the various robots MUST have a .PR file extension. However, when the game is
invoked, the use of this extension is optional.
CONTROLLING YOUR ROBOT'S MOVEMENT
To move your robot in P-ROBOTS you must use the special procedure "Drive" that
is built into the P-ROBOTS version of the PASCAL language. The Drive
procedure would be used in your program as:
Drive (degree,speed);
This would cause your robot to move in the direction specified by "degree" and
at the speed indicated by the second parameter, "speed". The direction will
be forced by the Drive procedure to be between 0 and 359 (i.e., degree :=
degree MOD 360;) and the speed will be restricted to between 0 and the maximum
of 100. Calling the Drive procedure with a speed of zero, will cause your
robot to stop.
For example:
Drive(90,100); (* drive north at top speed *)
Drive(heading,0); (* slow down and stop *)
In an attempt to simulate some degree of reality, a robot's speed does not
change instantly, but rather has to go through periods of acceleration and
deceleration. For example, to stop a robot traveling at a maximum speed of
100 will take between 100 and 200 meters. Conversely, to get up to a speed of
100 from a standing stop will also take between 100 and 200 meters.
4
Also, your robot will not be able to "turn on a dime". You must be moving at
a speed of 50 or less to change directions. Attempting to turn while going
over 50 will cause your robot's drive motor to "over heat" and your robot will
just coast to a stop on its current heading.
To monitor the status of your movement on the battlefield, the P-ROBOTS
version of PASCAL has several special built-in functions.
The built-in "Speed" function returns the current speed of your robot (from 0
to 100). Remember that the value returned by Speed may not always be the same
as the last parameter used in the last call to Drive, because of acceleration
and deceleration.
An example of how the Speed function might be used is as follows:
Drive(270,100); (* start driving, due south *)
; ; ; (* other instructions *)
IF Speed = 0 (* check if stopped, i.e., current speed = 0 *)
THEN Drive(90,20); (* Probably, ran into the south border *)
(* Go north at speed of 20 *)
The built-in "Loc_X" and "Loc_Y" functions return your robots X and Y
coordinates on the battlefield, respectively. The following shows how these
functions might be used:
Drive (45,50); (* start driving in north-easterly direction *)
WHILE (Loc_X < 900) AND (Loc_Y < 900) DO Drive(45,50);
(* i.e., just keep driving until we are close to a border *)
Drive (45,0); (* slow down and stop *)
ATTACKING OTHER ROBOTS
The main offensive weapons available to your robot are its scanner and its
cannon. Both of these weapons are controlled by using special built-in
capabilities of the P-ROBOTS PASCAL language.
The scanner is an "electronic eye" that enables your robot to look for enemy
robots in any chosen direction from 0 to 359 degrees. The scanner has a
maximum resolution of +/- 10 degrees. This allows your robot to quickly scan
the battlefield at a low resolution, then use finer resolution to pinpoint a
foe's precise position. The scanner would be accessed by a reference to the
"Scan" function, as follows:
Scan(degree,resolution)
This function invokes the robot's scanner, at the specified degree and
resolution. This function returns an integer value of 0 if no enemy robots
are within the scan range or a integer value (greater than 0) representing the
distance to the nearest robot in the scan area. The value passed as the
parameter "degree" will be forced to be in the range 0 to 359. Likewise, the
"resolution" will be forced to be in the range of +/- 10 degrees.
5
Some examples:
Enemy := Scan(180,10); (* scans the area from 170 to 190 degrees *)
Dist_To_Foe := Scan(180,2); (* scans the area from 178 to 182 degrees *)
Target_Range := Scan(90,0); (* scan 90 degrees, with no variance *)
Once an enemy robot is found with the scanner, you would use your robot's
cannon to fire a missile at the enemy. This is done by using P-ROBOTS special
"Cannon" procedure:
Cannon(degree,range);
This will fire a missile in the direction specified by the parameter "degree"
and for a distance specified by the value of "range". Your robot's cannon has
a maximum range of 700 meters. There are an unlimited number of missiles --
so you need not worry about running out. However, it will take some time to
reload between firing missiles; so that, the number of missiles in the air at
any one time to limited to two. The cannon is mounted on an independent
turret, and therefore can fire in any direction, regardless of the robot's
current movement direction.
For example, the following "chunk" of code will cause your robot to constantly
scan for enemies and blast away at them as long as they are in sight. When
they are no longer in sight (or in range), the scanner will move to the next
20 degree segment of the circle:
Angle := 0; (* initialize to east *)
REPEAT
Enemy_Range := Scan(Angle,10); (* Get range to target -- if any *)
WHILE (Enemy_Range > 40) AND (Enemy_Range <= 700) DO
BEGIN (* Enemy in sight and in range *)
Cannon(Angle,Enemy_Range); (* Blast it! *)
Enemy_Range := Scan(Angle,10); (* Still there? *)
END;
Angle := Angle + 20; (* move search to next segment *)
UNTIL Dead or Winner;
The "Dead" and the "Winner" in the UNTIL statement are special pre-defined
Boolean functions in P-ROBOTS. Dead will have a value of FALSE while your
robot is still alive (i.e., its damage is less than 100%) and TRUE when it
finally dies. Similarly, Winner will be TRUE if your robot is the last
survivor of the battle and FALSE otherwise.
If your robot utilized the basic "Sitting Duck" strategy given above, its
opponents would undoubtedly make short work of it. To make the strategy a
little smarter, we need some way to determine if we are under attack.
Fortunately (and not surprisingly), P-ROBOTS has another special function that
can assist us -- the Damage function. Whenever you use this function in your
code, it will return an integer value of your robot's current damage
percentage. If this value changes, then we know the robot is under attack and
it probably should run for safety.
As an example, let's see how the Damage function could be used to make the
above code a little smarter:
6
Old_Damage := Damage; (* Get initial value of damage *)
Angle := 0; (* initialize to east *)
REPEAT
Enemy_Range := Scan(Angle,10); (* Get range to target -- if any *)
WHILE (Enemy_Range > 40) AND (Enemy_Range <= 700) DO
BEGIN (* Enemy in sight and in range *)
Cannon(Angle,Enemy_Range); (* Blast it! *)
Enemy_Range := Scan(Angle,10); (* Still there? *)
END;
Angle := Angle + 20; (* move search to next segment *)
IF Damage > Old_Damage THEN
BEGIN (* Under attack *)
Old_Damage := Damage; (* Get latest Damage value *)
Move; (* Get out of here!! *)
END;
UNTIL Dead or Winner;
The "Move" reference above would call a separate procedure that would move the
robot to another position on the battlefield where it will hopefully be safer.
This procedure will be given a little latter as another example.
OTHER SPECIAL P-ROBOTS FUNCTIONS AND PROCEDURES
TIME
The built-in Time function returns the current time as measures by the
P-ROBOTS' CPU cycles. By using this function, you should be able to calculate
the speed of your enemies. The value returned by this function is restricted
to being in the range 0 to 32767 and when it gets to 32767 it starts again at
zero. An example of how you might get this value is as follows:
Start_Time := Time;
DISTANCE
Since your robot will frequently find it useful to be able to calculate
distances from one point on the battlefield to another, P-ROBOTS provides a
built-in function to do it:
Distance(X1,Y1,X2,Y2)
would return the integer distance from the point X1,Y1 to the point X2,Y2.
ANGLE_TO
The Angle_To function will return the angle to a point on the battlefield from
your robot's current position. The value returned will be an integer in
degrees from 0 to 359. As an example of how both the Distance and Angle_To
functions might be used, consider the following procedure that will move your
robot to the point X,Y on the battlefield:
7
PROCEDURE GoTo(X, Y : Integer);
(* Go to location X,Y on playing field. *)
VAR
Heading : Integer;
BEGIN
(* Find the heading we need to get to the desired spot. *)
Heading := Angle_To(X, Y);
(* Keep traveling at top speed until we are within 150 meters. *)
WHILE (Distance(Loc_X, Loc_Y, X, Y) > 150) DO Drive(Heading, 100);
(* Cut speed, and creep the rest of the way. *)
WHILE (Distance(Loc_X, Loc_Y, X, Y) > 20) DO Drive(Heading, 20);
(* Stop driving, should coast to a stop. *)
Drive(Heading, 0); (* I.E., Stop *)
END; (* GoTo(X,Y) *)
RANDOM
The function Random(limit) returns a random integer between 0 and limit. As
an example, the following procedure will cause your robot to move to a random
spot on the battlefield:
PROCEDURE Move;
(* Move to a random spot on the playing field. *)
VAR
x, y : Integer;
BEGIN
x := Random(900) + 50;
y := Random(900) + 50;
GoTo(x, y);
END; (* Move *)
Notice that the Move procedure makes use of the GoTo(X,Y) procedure developed
in the previous example.
TRIG FUNCTIONS
P-ROBOTS has several standard Trig functions that will be of value to a clever
robot, specifically:
Sin(degree) will return the real value of the Sin of an angle of
degree where degree is an integer from 0 to 359
Cos(degree) will return the real value of the Cos of an angle of
degree where degree is an integer from 0 to 359
ArcTan(ratio) will the angle in integer degrees that has a Tan of
ratio
8
INFLICTING DAMAGE
Your robot can be damaged by only two things: collisions and missiles. The
level of damage is given by the following table:
2% -- A collision with another robot (both robots in a collision
receive damage) or one of the battlefield walls. A collision
also causes the robot to stop cold, i.e., its speed is reduced
instantly to 0.
3% -- A missile explodes within a 40 meter radius.
5% -- A missile explodes within a 20 meter radius.
10% -- A missile explodes within a 5 meter radius.
Damage is inflicted on ALL robots within these distances. That means that if
one of your own missiles explodes within 40 meters of your robot, it causes
damage. Using sloppy programming logic, it is possible for your robot to
commit suicide by firing missiles too close to itself. For example, your
robot would not last long with this code:
Drive(Angle,100);
WHILE (Loc_X < 999) DO Cannon(Angle,Scan(Angle,10));
Damage is cumulative, and cannot be repaired. However, a robot does not loose
any mobility, fire potential, etc. at high damage levels. In other words, a
robot at 99% damage performs equally as well as a robot with no damage.
However, when the damage level gets to 100% your robot is dead and it is out
of the current competition.
PUTTING IT ALL TOGETHER
Here is a complete sample robot named HotShot:
PROCEDURE HotShot;
(*
Author: David Malmberg
Strategy: Stay in one place. Find a foe. Take a shot.
Keep improving aim and shooting until foe is lost from sights.
Then move sights (scanning) to adjacent target area. If
hit, then move to another random position on playing field.
If the Robot scans two complete circles (720 degrees) without
finding a foe in shooting range, move to another spot on the
field. (This will avoid "stand-offs" where opponents stay
just out of range of one another.)
This Robot should be VERY effective against foes which
are stopped or are moving slowly. It will be less effective
against Robots traveling at high speeds.
*)
9
VAR (* HotShot "Global" variables *)
Angle, (* Scanning angle *)
Last_Damage, (* Robot's last damage value *)
Range, (* Range/Distance to foe *)
Sweep, (* "Sweep count" -- when = 36, have scanned 720 degrees *)
Delta (* Scanning arc *)
: Integer;
PROCEDURE GoTo(X, Y : Integer);
(* Go to location X,Y on playing field. *)
VAR
Heading : Integer;
BEGIN
(* Find the heading we need to get to the desired spot. *)
Heading := Angle_To(X, Y);
(* Keep traveling at top speed until we are within 150 meters. *)
WHILE (Distance(Loc_X, Loc_Y, X, Y) > 150) DO Drive(Heading, 100);
(* Cut speed, and creep the rest of the way. *)
WHILE (Distance(Loc_X, Loc_Y, X, Y) > 20) DO Drive(Heading, 20);
(* Stop driving, should coast to a stop. *)
Drive(Heading, 0); (* I.E., Stop *)
END; (* GoTo(X,Y) *)
FUNCTION Hurt : Boolean;
(* Checks if Robot has incurred any new damage. *)
VAR
Curr_Damage : Integer;
Answer : Boolean;
BEGIN
Curr_Damage := Damage;
IF Curr_Damage > Last_Damage
THEN Answer := TRUE
ELSE Answer := FALSE;
Last_Damage := Curr_Damage;
Hurt := Answer;
END; (* Hurt *)
PROCEDURE Move;
(* Move to a random spot on the playing field. *)
VAR
x, y : Integer;
BEGIN
Sweep := 0; (* Reset Sweep counter to zero. *)
x := Random(900) + 50;
y := Random(900) + 50;
GoTo(x, y);
END; (* Move *)
10
PROCEDURE Aim( VAR Ang : Integer; VAR Arc : Integer);
(*
Improve aim by doing a binary search of the target area.
I.E., divide the target area in two equal pieces and redefine
the target area to be the piece where the foe is found.
If the foe is not found, expand the search area to the
maximum arc of plus or minus 10 degrees.
*)
BEGIN
(* Divide search area in two. *)
Arc := Arc DIV 2;
(* Check piece "below" target angle. *)
IF Scan(Ang - Arc, Arc) <> 0
(* If foe found, redefine target angle. *)
THEN Ang := Ang - Arc
(* If not found, then check piece "above" target angle. *)
ELSE IF Scan(Ang + Arc, Arc) <> 0
(* If foe found, redefine target angle. *)
THEN Ang := Ang + Arc
ELSE Arc := 10;
(* If foe not found in either piece, expand search arc to +/- 10 *)
END; (*Aim*)
BEGIN (* HotShot Main *)
(* Start scanning for foes in center of field. *)
Angle := Angle_To(500, 500);
Sweep := 0; (* Initialize Sweep counter to zero. *)
REPEAT (* Until Dead or Winner *)
Delta := 10; (* Start with widest scanning arc. *)
Range := Scan(Angle, Delta);
WHILE (Range > 40) AND (Range < 701) DO
(* Must be far enough away to avoid self-damage. *)
BEGIN
Sweep := 0; (* Found foe, so reset Sweep to zero *)
Aim(Angle, Delta); (* Improve aim. *)
Cannon(Angle, Range); (* Fire!! *)
Range := Scan(Angle, Delta); (* Is foe still in sights? *)
END;
Angle := Angle + 20; (* Look in adjacent target area. *)
Sweep := Sweep + 1;
IF Hurt OR (Sweep = 36) THEN Move;
(* If hit or have scanned two full circles, move elsewhere. *)
UNTIL Dead OR Winner;
END; (* HotShot Main *)
ROBOT PROGRAMMING RULES
There are several things in the above example the you should think of as rules
that your robots should ALWAYS observe.
1. Your robot should be in a "self-contained" PROCEDURE with the
following basic structure:
11
PROCEDURE RoboName;
{"Global" Variables}
FUNCTION A;
....
PROCEDURE B;
....
FUNCTION Z;
BEGIN {RoboName Main}
....
END; {RoboName Main}
Failure to follow this basic structure will cause the P-ROBOTS
program and your robot to both meet a fiery death.
2. A robot should have its PROCEDURE named exactly the same name
as the file with the code for the robot (except for the .PR
extension). I.E., the HotShot robot procedure should be in a
file named HOTSHOT.PR. Again, failure to follow this rule will
cause your robot program to crash.
3. In the "main" routine for your robot, you need to have some
kind of "infinite" loop that is repeat endlessly. In the
sample robot, HOTSHOT, this loop is the REPEAT ... UNTIL
structure:
REPEAT (* Until Dead or Winner *)
....
UNTIL Dead OR Winner;
Another "infinite" loop that would works equally well is:
WHILE (NOT Dead) AND (NOT Winner) DO
BEGIN
....
END;
4. Your robot source code should be very well documented with
comments.
12
APPENDIX I: COMPILER ERRORS
The PASCAL compiler in P-ROBOTS will report any syntax or logic errors that it
encounters during the compilation process. Then the program will terminate
without playing the game. A listing of the robot(s) source code with the
errors marked in the source will then be found in a file named LISTING.TXT on
the disk/directory where P-ROBOTS is being run. Because P-ROBOTS is going to
write to the disk, you must NOT have a "write-protect" tab on the disk or you
will get a fatal error whenever you try to run the program. This file should
be printed out and studied and your corrections made to your robot source
files. Do NOT make your corrections on the LISTING.TXT file! The compiler
only compiles robot files (i.e., files with a ".PR" extension).
If your robot(s) source code did not have any errors (that the compiler could
detect) there will not be a LISTING.TXT file created and the P-ROBOTS program
will execute normally and the contest between the various robots will be
played.
The compiler will report the following errors by number:
0. UNDEFINED IDENTIFIER
1. MULTIPLE DEFINITION OF THIS IDENTIFIER
2. EXPECTED AN IDENTIFIER
3. PROGRAM MUST BEGIN WITH "PROGRAM"
4. EXPECTED CLOSING PARENTHESIS ")"
5. EXPECTED A COLON ":"
6. INCORRECTLY USED SYMBOL
7. EXPECTED IDENTIFIER OR THE SYMBOL "VAR"
8. EXPECTED THE SYMBOL "OF"
9. EXPECTED AN OPENING PARENTHESIS "("
10. EXPECTED IDENTIFIER, "ARRAY" OR "RECORD"
11. EXPECTED AN OPENING BRACKET "["
12. EXPECTED A CLOSING BRACKET "]"
13. EXPECTED ".." WITHOUT INTERVENING BLANKS
14. EXPECTED A SEMICOLON ";"
15. BAD RESULT TYPE FOR A FUNCTION
16. EXPECTED AN EQUAL SIGN "="
17. EXPECTED BOOLEAN EXPRESSION
18. CONTROL VARIABLE OF THE WRONG TYPE
19. MUST BE MATCHING TYPES
20. "OUTPUT" IS REQUIRED IN PROGRAM HEADING
21. THE NUMBER IS TOO LARGE
22. EXPECT PERIOD ".", CHECK BEGIN-END PAIRS
23. BAD TYPE FOR A CASE STATEMENT
24. ILLEGAL CHARACTER
25. ILLEGAL CONSTANT OR CONSTANT IDENTIFIER
26. ILLEGAL ARRAY SUBSCRIPT (CHECK TYPE)
27. ILLEGAL BOUNDS FOR AN ARRAY INDEX
28. INDEXED VARIABLE MUST BE AN ARRAY
29. EXPECTED A TYPE IDENTIFIER
30. UNDEFINED TYPE
31. VAR WITH FIELD SELECTOR MUST BE RECORD
32. EXPECTED TYPE "BOOLEAN"
33. ILLEGAL TYPE FOR ARITHMETIC EXPRESSION
34. EXPECTED INTEGER FOR "DIV" OR "MOD"
13
35. INCOMPATIBLE TYPES FOR COMPARISON
36. PARAMETER TYPES DO NOT MATCH
37. EXPECTED A VARIABLE
38. A STRING MUST HAVE ONE OR MORE CHAR
39. NUMBER OF PARAMETERS DO NOT MATCH
40. ILLEGAL PARAMETERS TO "READ"
41. ILLEGAL PARAMETERS TO "WRITE"
42. PARAMETER MUST BE OF TYPE "REAL"
43. PARAMETER MUST BE OF TYPE "INTEGER"
44. EXPECTED VARIABLE OR CONSTANT
45. EXPECTED A VARIABLE OR PROCEDURE
46. TYPES MUST MATCH IN AN ASSIGNMENT
47. CASE LABEL NOT SAME TYPE AS CASE CLAUSE
48. ARGUMENT TO STD. FUNCTION OF WRONG TYPE
49. THE PROGRAM REQUIRES TOO MUCH STORAGE
50. ILLEGAL SYMBOL FOR A CONSTANT
51. EXPECTED BECOMES ":="
52. EXPECTED "THEN"
53. EXPECTED "UNTIL"
54. EXPECTED "DO"
55. EXPECTED "TO" OR "DOWNTO"
56. EXPECTED "BEGIN"
57. EXPECTED "END"
58. EXPECTED ID, CONST, "NOT" OR "("
59. "INPUT" IS REQUIRED IN PROGRAM HEADING
60. ILLEGAL (CONTROL) CHARACTER PRESENT IN SOURCE
Not all of the above error messages will be used in P-ROBOTS because the
compiler has been modified to not allow certain kinds of PASCAL statements.
For example, since P-ROBOTS does not allow READs and WRITEs you will not get
the above error messages that are normally associated with READ and WRITE. If
you attempt to READ or WRITE in a P-ROBOTS program you will get an error
message number zero -- "UNDEFINED IDENTIFIER".
Also, remember not to use PASCAL "reserved" words as variable or procedure
names. I.E., variables named BEGIN, ARRAY, DO, FOR, etc. will cause strange
error messages.
On very rare occasions, you may get another kind of compiler error if the
robots' source code you are currently trying to compile is so "verbose" that
it causes the one of the compiler's tables to overflow. When this happens,
you will be given an error message which identifies which specific table has
been over flowed. The limits for these tables are as follows:
400 Identifiers (Variables, Constants, Procedure and Function
names)
40 Procedures or Functions
40 Real Constants
60 Arrays
7 Levels of "Nested" Procedures or Functions
4000 "Compiled" P-Code instructions
These limits apply to the total number of identifiers (etc.) for all of the
robots you have in the current contest.
14
APPENDIX II: RUN-TIME ERRORS
It is possible that the P-ROBOTS compiler will detect an error during the
game. These are known as "run-time" errors and they will cause the game to
terminate and an error message to be printed. The following kinds of
run-time errors will be caught and reported:
1. DIVIDE BY 0
For example, if Delta_X had a value of zero in the following
program statement, you would get a "DIVIDE BY 0" error:
Target_Angle := ArcTan(Delta_Y/Delta_X);
2. UNDEFINED CASE
For example, if the variable X had a value of 12 below you
would get an "UNDEFINED CASE" error:
CASE X OF
1 : .....
2 : .....
3 : .....
.
.
10 : .....
END; {CASE}
3. INVALID INDEX
For example, a reference to the tenth element of an array
(i.e., Spot[10]) that was only defined to have the elements one
through five (i.e., Spot : ARRAY[1..5] OF INTEGER;) would cause
an "INVALID INDEX" error.
4. STORAGE OVERFLOW
You would only get a "STORAGE OVERFLOW" error if one (or more)
of your robots in the current contest was making too many
recursive calls to the same procedure or function or was
evaluating a large number of very, very complex assignment
statements so that the robot's "stack" space was exceeded. If
you get this error, check your overall robot logic -- there
must be a better way!
15
APPENDIX III: COMMON PROBLEMS
If P-ROBOTS is not doing what you think it should do, check for these common
problems:
1. Leaving a "write-protect" tab on the game disk will cause a
fatal crash. There needs to be a way for the LISTING.TXT file
to be written on the disk.
2. Your robot must be a self-contained PASCAL PROCEDURE with the
same name as the file (but without the .PR extension).
3. Your robot must have an "infinite" loop in the "main" routine.
4. Don't commit robot "suicide" by firing your cannon for a range
of zero. For example:
Drive(Angle,100);
WHILE (Loc_X < 999) DO Cannon(Angle,Scan(Angle,10));
will cause your robot to commit suicide.
16
APPENDIX IV: THE P-ROBOTS PASCAL LANGUAGE
P-ROBOTS allows a relatively rich subset of the normal PASCAL language.
Predefined types include REAL, INTEGER, and BOOLEAN. CONSTants, RECORDs and
user-defined TYPEs are allowed. ARRAYs are allowed.
Comments may be added to a program by enclosing text with braces { }, or (* *)
pairs.
Variable and other identifier names may have up to 10 significant characters.
Arithmetic operators include: +, -, *, /, DIV and MOD. Comparison operators
include: >, <, <>, =, <=, and >=. Boolean operators include: AND, OR, and
NOT.
Control statements/structures include: CASE, FOR-TO-DO, FOR-DOWNTO-DO,
IF-THEN, IF-THEN-ELSE, REPEAT-UNTIL, and WHILE-DO.
Functions and Procedures may or may not have parameters. If a Function or a
Procedure has parameters, these parameters may be passed by value or by
reference (i.e., a VAR parameter). Procedures and Functions may be "nested"
to a maximum of seven levels. Recursion is allowed.
Pre-defined Functions include: TRUE, FALSE, ABS, SQR, ODD, SUCC, PRED, ROUND,
TRUNC, SIN, COS, EXP, LN, SQRT, ARCTAN, and RANDOM. All of these Functions
have the same interpretation in P-ROBOTS as in standard PASCAL, except for the
various Trig functions which use degrees in P-ROBOTS, rather than radians.
The following are NOT allowed in P-ROBOTS and will generate error messages:
CHAR, STRING, enumerated types, subranges, pointers, variant records, PACKED,
sets, IN, files, input, output, GET, PUT, READ, WRITE, WITH, LABEL, GOTO.
17
APPENDIX V: A BLATANT "PLUG" FOR ANOTHER SOFTWORKS PRODUCT
The Adventure Game Toolkit is designed to allow you to create and play your
own text adventure games. Once created, your adventure games can be shared
with and enjoyed by others -- even if they do not have a copy of the Adventure
Game Toolkit themselves.
The Adventure Game Toolkit (AGT) began life as a program by Mark Welch called
the Generic Adventure Game System (GAGS). Using GAGS it was possible for the
non-programmer to develop complete adventure games using a fixed (but
relatively large) vocabulary of action verbs. David Malmberg took GAGS and
made a number of enhancements including the ability to customize the
vocabulary and to program complex conditional tests and a rich assortment of
actions and messages using a special metalanguage (designed specifically for
writing adventure games). The current Adventure Game Toolkit combines the
best features of both approaches to enable the user to create two distinct
levels of adventure games:
(1) Standard Level games that require no programming experience
(honestly!), only a fertile imagination. These Standard Level games
follow the original GAGS format and only require that the user
generate the game using a word processor or text editor to describe
the various locations, objects and results of actions that
collectively make up the game.
(2) Professional Level games that also make use of the special adventure
game metalanguage to create games as complex and rich as the game
designer's imagination and prose style will allow. These games
should be technically comparable with the published text adventure
games from firms like Infocom.
FEATURES OF THE ADVENTURE GAME TOOLKIT
AGT has a number of features that make it a very comprehensive adventure
product. These features make AGT more powerful, more professional and easier
to use than any previously available text adventure game development system.
Some of these key features are:
POWERFUL
* Big, complex games with up to 200 locations, 100 inanimate
objects (e.g., treasures, swords, lakes, trees, books, etc.)
and 100 animate objects (e.g., people, animals or creatures).
* Large standard vocabulary with potential to define many more
words unique to a specific adventure. Typical games can have a
vocabulary of 400 words or more.
* Sophisticated parser that can understand (1) complex input
commands including pronouns (IT, HIM, HER, THEM, MY and ITS),
and (2) compound commands separated by AND or THEN or
punctuation symbols, and (3) commands addressed to characters
within the game. Here are a few examples of commands AGT can
handle with ease:
18
GET THE FLASH LIGHT AND THEN SWITCH IT ON
DROP THE FOOD, THE KEY AND THE BOTTLE THEN UNLOCK THE DOOR
WITH THE BRASS KEY AND THEN LEAVE
PUT ON THE CLOAK, THEN EXAMINE IT; READ ITS LABEL
PLACE THE GREEN ROCK AND THE SMALL PEBBLE BEHIND THE TREE
ENTER THE HOUSE; GET ALL; EXIT; SOUTH; SOUTH THEN DOWN
SULU, SET A COURSE FOR ALPHA 14
SCOTTY, BEAM DOWN A TRICORDER AND THE QWERTY MODULE
* Special, English-like metalanguage (especially developed for
writing Adventure games) that gives the game designer total
control and flexibility in the development of his/her games.
* Source code available to Registered Users. Over 10,000 lines
of Turbo Pascal 4.0/5.0 that may be customized to fit the game
designer's unique needs.
PROFESSIONAL
* "Look and feel" of Infocom adventure games with similar screen
layout and standard vocabulary and routines.
* Automatic screen adaptation to use either a color or a
monochrome monitor. Color combinations may be specified by the
game designer or by the player during the game.
* Predefined function and cursor keys to input frequently used
commands and move directions.
* SCRIPT and UNSCRIPT commands to echo game output to printer.
EASY-TO-USE
* Large library of completed games that can be enjoyed simply as
great entertainment or used as a platform by the game designer
to build upon and/or learn from.
* Professionally written documentation totalling about 200 pages.
Has numerous examples that unveil the "secrets" of great
adventure writers.
* Total compatibility with GAGS and its sizeable collection of
games.
HARDWARE REQUIREMENTS FOR AGT
The games created by the Adventure Game Toolkit requires a computer with at
least 384K of memory, MS-DOS 2.1, and at least one disk drive. It is possible
to use any kind of monitor and AGT will automatically adjust its output to
best suit the monitor.
19
HOW TO GET A COPY OF THE ADVENTURE GAME TOOLKIT
The Adventure Game Toolkit (AGT) is distributed as "Shareware". Copies can be
found on many electronic bulletin boards and time-sharing services including
Genie, CompuServe, Source and BIX. AGT is also available by mail directly
from the authors at:
Softworks
43064 Via Moraga
Mission San Jose, California 94539
You can also order by phone using your Mastercard or VISA to (415) 659-0533,
12:00 Noon to 9:00 PM, PST ONLY.
The price list for various versions/options of AGT is as follows:
1. AGT Registration .............................. @ $ 20.00 ea $ ______
includes: (1) Notice of all future AGT upgrades, new AGT
Adventures and related AGT products. (2) Latest version
of the program, sample Adventure game source files (CAVE,
CRUSADE, UNDERGRD, ALICE and others), and summary
documentation on disk. Over one megabyte of program and
data files -- ARCed on two disks. Normally, these disks
will not be sent until the next AGT upgrade. If you wish
these disks sent immediately, please indicate so in your
letter or call. (3) Telephone support from 7:00 to 9:00
PST (M-F). (4) A warm glow from having supported at least
one of the many Shareware products you probably use. (5)
The AGT authors' eternal gratitude.
2. Above with printed AGT manual ................. @ $ 35.00 ea $ ______
includes: Above items plus printed manual about 200 pages
long with numerous detailed examples on how to use the
Adventure Game Toolkit to create very professional and very
clever Adventure games. The printed AGT manual has
approximately 150% the amount of information as contained in
the summary disk documentation.
3. Printed AGT manual (Only) ..................... @ $ 20.00 ea $ ______
4. UPGRADE to the newest AGT version (Only) ...... @ $ 12.00 ea $ ______
includes: Latest version of the program, sample Adventure
game source files (CAVE, CRUSADE, UNDERGRD, ALICE and others),
and summary documentation on disk. Over one megabyte of
program and data files -- ARCed on two disks.
5. AGT Turbo Pascal 4.0 source code .............. @ $ 50.00 ea $ ______
includes: Turbo Pascal 4.0 source code for AGT's COMPILE
and RUN programs. Over 10,000 lines of Turbo Pascal source
code. YOU MUST BE A REGISTERED AGT USER TO ORDER THE
SOURCE CODE!
20
Orders are normally shipped by US mail at no additional charge.
For UPS shipment, please add $4.00................@ $ 4.00 ea $ ______
For shipments outside the United States, please add @ $ 5.00 $ ______
Subtotal $ ______
(California residents please add 7% sales tax) Tax $ ______
TOTAL $ ______
Payment by: ( ) Check ( ) MasterCard ( ) VISA ( ) Cash
Be sure to specify the computer/disk version desired:
_____ Macintosh _____ IBM 5 1/4 _____ IBM 3 1/2
Name: _______________________________________________________________
Address: _______________________________________________________________
: _______________________________________________________________
State: ______________________________ Zip:____________________________
Day Phone: ____________________________ Eve: _____________________________
Card #: _________________________________ Exp. Date: __________________
Signature of cardholder: _________________________________________________
21
APPENDIX VI: ABOUT THE AUTHOR
David Malmberg has been active in the world of personal computer since 1977.
He is the author or co-author of six published software products.
His most successful products were the Turtle Graphics series published by
HESware. These two programs have sold over 80,000 copies world-wide, been
translated into Spanish, and won two Consumer Electronic Software Showcase
awards as some of the best software of 1983. These programs are widely used
in schools to teach computer literacy to children and other computer novices.
His most recent software product was the Adventure Game Toolkit written with
Mark Welch. The Adventure Game Toolkit is also available from Softworks.
Dave has also published numerous articles and programs in various computer
magazines. He has been a Contributing Editor of both COMPUTE!'s HOME &
EDUCATIONAL COMPUTING and MICRO magazines. He was one of the principal
authors of COMPUTE!'s FIRST BOOK OF VIC, the best selling computer book of
1983. He has written regular columns on educational uses of computers and on
LOGO for COMMODORE and POWER/PLAY magazines.
22